package net.cmbt.okframe.okwebview;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;

import net.cmbt.okframe.R;

public class LookPicActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
        //        setTheme(R.style.AppSplash);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏
        setContentView(R.layout.activity_look_pic);

        EnhancedImageView imgimgimg = (EnhancedImageView) findViewById(R.id.imgimgimg);
        ImageView close = (ImageView) findViewById(R.id.close);

        RequestOptions requestOptions = new RequestOptions();
        requestOptions.fitCenter();

        String path = getIntent().getStringExtra("path");
        Glide.with(this).load(path).apply(requestOptions).into(imgimgimg);

        close.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }
}